<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'form',
    'htmlOptions' => array(
        'class' => 'form-horizontal'
    ),
        ));
?>
<div class="control-group">
    <?php echo $form->labelEx($model, 'root', array('class' => 'control-label')); ?>
    <div class="controls">
        <?php echo CHtml::activeDropDownList($model, 'root', ProductCategory::Category()); ?>
        <?php echo $form->error($model, 'root'); ?>
    </div>
</div>
<div class="control-group">
    <?php echo $form->labelEx($model, 'name', array('class' => 'control-label')); ?>
    <div class="controls">
        <?php echo $form->textField($model, 'name', array('class' => 'span5')); ?>
        <?php echo $form->error($model, 'name'); ?>
    </div>
</div>
<div class="control-group">
    <?php echo $form->labelEx($model, 'status', array('class' => 'control-label')); ?>
    <div class="controls">
        <?php echo $form->checkBox($model, 'status', array('value' => '1', 'checked' => 'checked')); ?>
        <?php echo $form->error($model, 'status'); ?>
    </div>
</div>

<div class="form-actions">
    <?php
    echo CHtml::submitButton($model->isNewRecord ? 'Thêm' : 'Lưu', array('class' => 'btn btn-success'));
//                echo CHtml::Button('Them moi', array('onclick' => 'createHrDepart(); return false;', 'class' => 'btn btn-success'));
    ?>

</div>

<?php $this->endWidget(); ?>